import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'amfe-flexible'
import 'element-plus/dist/index.css'
import echartsVue from './components/echarts/index.vue'


const baseSize = 16
function setRem(){
  const scale = document.documentElement.clientWidth / 1920;
  // 设置页面根节点字体大小
  document.documentElement.style.fontSize =
      baseSize * Math.min(scale, 2) + "px";
}

setRem();
// 改变窗口大小时重新设置 rem
window.onresize = function () {
    setRem();
};



const app = createApp(App)


app.use(router).use(ElementPlus)
.component('echarts-vue',echartsVue)
.mount('#app')


